{% set nagios_plugin_path = '/usr/lib/nagios/plugins' %}
### Disk space ###
command[check_disk_root]={{ nagios_plugin_path }}/check_disk -w 10% -c 5% -p /
command[check_disk_var]={{ nagios_plugin_path }}/check_disk -w 10% -c 5% -p /var
command[check_disk_log]={{ nagios_plugin_path }}/check_disk -w 10% -c 5% -p /var/log
{% if inventory_hostname in groups['galera'] %}
command[check_disk_mysql]={{ nagios_plugin_path }}/check_disk -w 10% -c 5% -p /var/lib/mysql
{% endif %}
{% if inventory_hostname in groups['mongodb'] %}
command[check_disk_mongodb]={{ nagios_plugin_path }}/check_disk -w 10% -c 5% -p /var/lib/mongodb
{% endif %}
{% if inventory_hostname in groups['nova_compute'] %}
command[check_disk_nova]={{ nagios_plugin_path }}/check_disk -w 10% -c 5% -p /var/lib/nova
{% endif %}

### Load ###
command[check_load]={{ nagios_plugin_path }}/check_load -r -w {{ load_average_warning }} -c {{ load_average_critical }}

{% if inventory_hostname in groups['memcached'] %}
### Memcache ###
command[check_memcached]={{ nagios_plugin_path }}/check_tcp -H {{ ip.mgmt }} -p 11211
{% endif %}

{% if inventory_hostname in groups['galera'] %}
### MySQL ###
command[check_galera]={{ nagios_plugin_path }}/check_mysql -H localhost -u clustercheck -p{{ galera_clustercheck_password }}
{% endif %}

{% if inventory_hostname in groups['ceph_monitor'] %}
### Ceph ###
command[check_ceph_health]=/usr/local/bin/check_ceph_health --id nagios --conf /etc/ceph/{{ ceph_cluster_name }}.conf --keyring /etc/ceph/{{ ceph_cluster_name }}.client.nagios.keyring
command[check_ceph_df]=/usr/local/bin/check_ceph_df --id nagios --conf /etc/ceph/{{ ceph_cluster_name }}.conf --keyring /etc/ceph/{{ ceph_cluster_name }}.client.nagios.keyring -W 80 -C 90
{% endif %}

{% if inventory_hostname in groups['haproxy'] %}
### HAProxy ###
command[check_haproxy]=sudo /usr/local/bin/check_haproxy_stats.pl -s /run/haproxy/admin.sock
{% endif %}

{% if inventory_hostname in groups['rabbitmq'] %}
### HAProxy ###
command[check_rabbitmq]=sudo /usr/local/bin/check_rabbitmq_cluster.py
{% endif %}

{% if nagios_bond %}
command[check_bonding]=/usr/local/bin/check_linux_bonding.pl
{% endif %}

{% if nagios_mdraid %}
command[check_swraid]=/usr/local/bin/check_swraid.py
{% endif %}

{% if nagios_ipmi %}
command[check_ipmi]=sudo /usr/local/bin/check_ipmi_sensors
{% endif %}
